package Presentacion;

import ModeloLogicoSistema.AdministradorCliente;
import ModeloLogicoSistema.AdministradorOrden;
import ModeloLogicoSistema.Cliente;
import ModeloLogicoSistema.Orden;
import ModeloLogicoSistema.Servicio.TipoServicio;
import ModeloLogicoSistema.ServicioContratado;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.ListIterator;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.JSpinner;
import javax.swing.table.DefaultTableModel;



/**
 *
 * @author Veko
 */
public class ModificacionOrden extends javax.swing.JDialog {
    
    private AdministradorCliente administradorClientes = null;
    private AdministradorOrden administradorOrden = null;
    private Calendar calendario = new GregorianCalendar();
    private Cliente cliente;
    private Orden orden;
    private ArrayList<ServicioContratado> serviciosContratados = new ArrayList<>();
    private SimpleDateFormat formateador = new SimpleDateFormat("dd/MM/yyyy");
    private SimpleDateFormat formateadorHora = new SimpleDateFormat("hh:mm");
    private String fechaHoy=null;
    private ModificacionOrden _this;

    private void cargarTablaPendientes(){
        String primerDia,segundoDia,tercerDia,cuartoDia,quintoDia,sextoDia,
                septimoDia,octavoDia;
        Calendar cal=Calendar.getInstance();
        fechaHoy=formateador.format(cal.getTime());
        primerDia=formateador.format(cal.getTime());
        cal.add(Calendar.DATE, 1);
        segundoDia= formateador.format(cal.getTime());
        cal.add(Calendar.DATE, 1);
        tercerDia=formateador.format(cal.getTime());
        cal.add(Calendar.DATE, 1);
        cuartoDia=formateador.format(cal.getTime());
        cal.add(Calendar.DATE, 1);
        quintoDia=formateador.format(cal.getTime());
        cal.add(Calendar.DATE, 1);
        sextoDia=formateador.format(cal.getTime());
        cal.add(Calendar.DATE, 1);
        septimoDia=formateador.format(cal.getTime());
        cal.add(Calendar.DATE, 1);
        octavoDia=formateador.format(cal.getTime());
        tablaPendientes.setValueAt(TipoServicio.Planchado.toString(), 0, 0);
        tablaPendientes.setValueAt(TipoServicio.Valets.toString(), 1, 0);
        tablaPendientes.setValueAt("Deliverys", 2, 0);
        
        DefaultTableModel tableModel = (DefaultTableModel) tablaPendientes.getModel();
        String dias []={"Pendientes", primerDia,segundoDia,tercerDia,
           cuartoDia,quintoDia,sextoDia,septimoDia,octavoDia};
        tableModel.setColumnIdentifiers(dias);
        cargarPendientes();
        tablaPendientes.setModel(tableModel);
        addWindowListener(new WindowAdapter(){
            public void windowClosing(WindowEvent we){
            int eleccion = JOptionPane.showConfirmDialog(null, "Si cierra esta ventana perderá los cambios hechos. ¿Aun desea cerrar?","Advertencia",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
            if ( eleccion == 0) {
                _this.dispose();
            }   
        }

    });                
  }
    
    private void cargarPendientes() {
        DefaultTableModel modelo=(DefaultTableModel)this.tablaPendientes.getModel();
        int cantCol=modelo.getColumnCount();
        String fechaEntrega=null;
        for(int i=1;i<cantCol;i++){
            try {
                fechaEntrega=tablaPendientes.getColumnName(i);
                int prendaLavado=this.administradorOrden.getCantPendientes(fechaEntrega,TipoServicio.Planchado.toString());
                modelo.setValueAt(prendaLavado, 0, i);
                int valetLavado=this.administradorOrden.getCantPendientes(fechaEntrega,TipoServicio.Valets.toString());
                modelo.setValueAt(valetLavado, 1, i);
                int deliverys = this.administradorOrden.getCantDeliverysPendientesParaDia(fechaEntrega);
                modelo.setValueAt(deliverys, 2, i);
    
            } catch (SQLException ex) {
                Logger.getLogger(AltaOrden.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
    
    private void cargarServiciosSeleccionados() {
        ListIterator it = serviciosContratados.listIterator();
        DefaultTableModel modelo=(DefaultTableModel)this.tablaServicio.getModel();
        while (it.hasNext()) {
            ServicioContratado s = (ServicioContratado) it.next();
            String nombre=s.getNombre();
            Double precio=s.getPrecio();
            Integer cant=s.getCantidad();
            Double subt=precio*cant;
            Object fila[]={nombre,precio,cant,subt};
            modelo.addRow(fila);
        }

    }
    
    private void cargarFechas(){
        //DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
        //Calendar cal = Calendar.getInstance();

        txtFecha.setText(this.orden.getFechaPedido());
        txtHora.setText(this.orden.getHoraPedido());
        //Calendar hoy = Calendar.getInstance();
        
        txtFecha.setEditable(false);
        Date ahora = new Date();
        //SimpleDateFormat formateador = new SimpleDateFormat("dd/MM/yyyy");
        formateador.format(ahora);
        this.jDateChooser1.setMinSelectableDate(ahora);
    }
    
    void iniciarComponentes(Integer codOrden) throws SQLException{
        this.setSize(1005,720);
        this.setLocationRelativeTo(null);
            try {
            this.btnListo.setVisible(false);
            this.btnEntregada.setVisible(false);
            administradorOrden = new AdministradorOrden();
            this.orden=this.administradorOrden.cargarOrden(codOrden);
            if(orden.tieneDelivery()){
                this.labelDelivery.setText("Entrega Delivery");
            }else{
                this.labelDelivery.setText("Retira por local");
            }
            idO.setText(this.orden.getCodOrden().toString());
            idO.setEditable(false);
            txtFechaPautada.setText(orden.getFechaEntregaPactada());
            String estado=orden.getSituacionOrden();
            txtEstado.setText(estado);
            this.cargarFechas();
            this.areaObservaciones.setText(this.orden.getObservaciones());
            if(this.areaObservaciones.getText().equalsIgnoreCase("null")){
                this.areaObservaciones.setText("");
            }
            this.txtFechaEntrega.setText(orden.getFechaEntrega());
            this.txtFechaListo.setText(orden.getFechaListo());
            this.txtHoraEntrega.setText(orden.getHoraEntrega());
            this.txtHoraListo.setText(orden.getHoraListo());
            try{
                //Extraigo el valor de la hora, para el spinner
                this.txtHoraDesde.setText(orden.getHoraPactadaDesde());
              
                if(this.orden.tieneDelivery()) {
                    this.txtHoraHasta.setText(orden.getHoraPactadaHasta());
                
                }
                else{
                    this.txtHoraHasta.setVisible(false);
                    this.labelHoraHasta.setVisible(false);
                }
            }catch(Exception e){}
            if(estado.equalsIgnoreCase("PENDIENTE")){
                this.btnListo.setVisible(true);
                this.txtFechaEntrega.setVisible(false);
                this.labelFechaEntrega.setVisible(false);
                this.labelHoraEntrega.setVisible(false);
                this.txtHoraEntrega.setVisible(false);
                this.txtFechaListo.setVisible(false);
                this.labelFechaListo.setVisible(false);
                this.txtHoraListo.setVisible(false);
                this.labelHoraListo.setVisible(false);
            }
            
            if(estado.equalsIgnoreCase("LISTA")){
                
                this.txtFechaEntrega.setVisible(false);
                this.labelFechaEntrega.setVisible(false);
                this.labelHoraEntrega.setVisible(false);
                this.txtHoraEntrega.setVisible(false);
                this.btnEntregada.setVisible(true);
                this.txtLugarAlmacenaje.setText(orden.getLugarDeAlmacenajePedidoListo());
            }
            if(estado.equalsIgnoreCase("ENTREGADA")){
                this.jDateChooser1.setVisible(false);
                this.labelNuevaFecha.setVisible(false);
                this.btnConservar.setVisible(false);
            }
            DefaultTableModel modelo=(DefaultTableModel)tablaMontos.getModel();
            Double subtotal=this.orden.getMontoTotal()-this.orden.getDescuento();
            Object [] filaMonto={orden.getMontoTotal(),orden.getDescuento(),subtotal,this.orden.getMontoAbonado(),this.orden.getMontoAdeudado()};
            modelo.addRow(filaMonto);
            this.cargarTablaPendientes();
        } catch (SQLException ex) {
            Logger.getLogger(AltaOrden.class.getName()).log(Level.SEVERE, null, ex);
        }
    
        Integer cod=this.orden.getCodCliente();
        this.administradorClientes = new AdministradorCliente();
        this.cliente = this.administradorClientes.cargarCliente(cod) ;
        this.txtIDcliente.setText(cod.toString());
        this.txtNombre.setText(cliente.getNombre());
        this.txtApellido.setText(cliente.getApellido());
        this.txtDireccion.setText(cliente.getCalle()+" "+cliente.getNroCalle());
        this.txtTel.setText(cliente.getTelFijo());
        this.txtCel.setText(cliente.getCel());
        this.serviciosContratados=new ArrayList();
        try{
            ArrayList<ServicioContratado> lista=(ArrayList<ServicioContratado>) this.administradorOrden.mostrarTodosLosServiciosContratados(orden.getCodOrden());
            this.serviciosContratados.addAll(lista);
            ArrayList<ServicioContratado> lista2=(ArrayList<ServicioContratado>)this.administradorOrden.mostrarTodosLosServiciosEspContratados(orden.getCodOrden());
            this.serviciosContratados.addAll(lista2);
            cargarServiciosSeleccionados();
        }catch(Exception e ){
            this.tablaServicio.setVisible(false);
        }
        
//        this.jSpinner2.setVisible(false);
        
        this.setVisible(true);
        //iniciarTablaMontos();
    }

    /**
     * Creates new form ModificacionOrden
     */
    public ModificacionOrden(java.awt.Frame parent, boolean modal) {
        
        super(parent, modal);
        _this=this;
        initComponents();
       
        
        /*
        
        * try {
            iniciarComponentes(codOrden);
        } catch (SQLException ex) {
            Logger.getLogger(ModificacionOrden.class.getName()).log(Level.SEVERE, null, ex);
        }*/
        
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        idO = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        txtFecha = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        txtHora = new javax.swing.JTextField();
        jSeparator1 = new javax.swing.JSeparator();
        txtEstado = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        tablaServicio = new javax.swing.JTable();
        jScrollPane3 = new javax.swing.JScrollPane();
        tablaMontos = new javax.swing.JTable();
        labelNuevaFecha = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        txtIDcliente = new javax.swing.JTextField();
        labelCliente = new javax.swing.JLabel();
        txtNombre = new javax.swing.JTextField();
        txtApellido = new javax.swing.JTextField();
        labelNombre = new javax.swing.JLabel();
        labelApellido = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        labelDireccion = new javax.swing.JLabel();
        labelTel = new javax.swing.JLabel();
        labelCel = new javax.swing.JLabel();
        txtDireccion = new javax.swing.JTextField();
        txtTel = new javax.swing.JTextField();
        txtCel = new javax.swing.JTextField();
        jSeparator3 = new javax.swing.JSeparator();
        jDateChooser1 = new com.toedter.calendar.JDateChooser();
        jScrollPane5 = new javax.swing.JScrollPane();
        tablaPendientes = new javax.swing.JTable();
        labelFechaPautada = new javax.swing.JLabel();
        txtFechaPautada = new javax.swing.JTextField();
        btnConservar = new javax.swing.JButton();
        btnCancelar = new javax.swing.JButton();
        btnListo = new javax.swing.JButton();
        btnEntregada = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        txtLugarAlmacenaje = new javax.swing.JTextArea();
        labelLugar = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        areaObservaciones = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        labelHoraDesde = new javax.swing.JLabel();
        labelHoraHasta = new javax.swing.JLabel();
        txtHoraDesde = new javax.swing.JTextField();
        txtHoraHasta = new javax.swing.JTextField();
        labelFechaListo = new javax.swing.JLabel();
        labelHoraListo = new javax.swing.JLabel();
        txtFechaListo = new javax.swing.JTextField();
        txtHoraListo = new javax.swing.JTextField();
        labelFechaEntrega = new javax.swing.JLabel();
        labelHoraEntrega = new javax.swing.JLabel();
        txtFechaEntrega = new javax.swing.JTextField();
        txtHoraEntrega = new javax.swing.JTextField();
        labelDelivery = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Modificar Orden");
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel6.setText("IDOrden");

        idO.setEditable(false);
        idO.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                idOActionPerformed(evt);
            }
        });

        jLabel3.setText("Hora");

        txtFecha.setEditable(false);
        txtFecha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtFechaActionPerformed(evt);
            }
        });

        jLabel2.setText("Fecha");

        txtHora.setEditable(false);
        txtHora.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtHoraActionPerformed(evt);
            }
        });

        txtEstado.setEditable(false);
        txtEstado.setBackground(new java.awt.Color(0, 0, 0));
        txtEstado.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        txtEstado.setForeground(new java.awt.Color(255, 204, 204));
        txtEstado.setHorizontalAlignment(javax.swing.JTextField.CENTER);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(idO, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 306, Short.MAX_VALUE)
                        .addComponent(txtEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(261, 261, 261)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3))
                        .addGap(39, 39, 39)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtFecha, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtHora, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jSeparator1))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(9, 9, 9)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(1, 1, 1)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel6)
                                    .addComponent(idO, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txtFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel2)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtHora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addComponent(txtEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 11, 970, 90));

        tablaServicio.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nombre de Servicio", "Precio", "Cantidad", "Subtotal"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Double.class, java.lang.Double.class, java.lang.Double.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaServicio.setColumnSelectionAllowed(true);
        tablaServicio.getTableHeader().setReorderingAllowed(false);
        jScrollPane1.setViewportView(tablaServicio);
        tablaServicio.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);

        getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 350, -1, 109));

        tablaMontos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "SUBTOTAL", "DESCUENTO", "TOTAL", "SEÑA", "SALDO"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Double.class, java.lang.Double.class, java.lang.Double.class, java.lang.Double.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaMontos.setColumnSelectionAllowed(true);
        tablaMontos.getTableHeader().setReorderingAllowed(false);
        tablaMontos.addInputMethodListener(new java.awt.event.InputMethodListener() {
            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
                tablaMontosInputMethodTextChanged(evt);
            }
            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
            }
        });
        tablaMontos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                tablaMontosKeyPressed(evt);
            }
        });
        jScrollPane3.setViewportView(tablaMontos);
        tablaMontos.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION);

        getContentPane().add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 470, 380, 44));

        labelNuevaFecha.setText("Pautar Nueva Fecha Entrega:");
        labelNuevaFecha.setToolTipText("");
        getContentPane().add(labelNuevaFecha, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 550, 180, 20));

        txtIDcliente.setEditable(false);
        txtIDcliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtIDclienteActionPerformed(evt);
            }
        });

        labelCliente.setText("IDCliente");

        txtNombre.setEditable(false);

        txtApellido.setEditable(false);
        txtApellido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtApellidoActionPerformed(evt);
            }
        });

        labelNombre.setText("Nombre");

        labelApellido.setText("Apellido");

        labelDireccion.setText("Dirección");

        labelTel.setText("Telefono");

        labelCel.setText("Celular");

        txtDireccion.setEditable(false);
        txtDireccion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtDireccionActionPerformed(evt);
            }
        });

        txtTel.setEditable(false);
        txtTel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtTelActionPerformed(evt);
            }
        });

        txtCel.setEditable(false);
        txtCel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtCelActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(labelCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtIDcliente, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(219, 219, 219)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(labelNombre)
                                .addGap(18, 18, 18)
                                .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(labelApellido)
                                .addGap(18, 18, 18)
                                .addComponent(txtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(labelDireccion)
                                .addGap(44, 44, 44)
                                .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addGap(10, 10, 10)
                                    .addComponent(labelCel)
                                    .addGap(43, 43, 43)
                                    .addComponent(txtCel, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addComponent(labelTel)
                                    .addGap(44, 44, 44)
                                    .addComponent(txtTel, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCliente)
                    .addComponent(txtIDcliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelNombre)
                    .addComponent(labelDireccion)
                    .addComponent(txtDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelApellido)
                    .addComponent(labelTel)
                    .addComponent(txtTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelCel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 108, 970, 120));
        getContentPane().add(jSeparator3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 530, 980, 10));

        jDateChooser1.setDateFormatString("dd/MM/yyyy");
        jDateChooser1.setMinSelectableDate(new java.util.Date(-62135755136000L));
        getContentPane().add(jDateChooser1, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 580, 140, -1));

        tablaPendientes.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null}
            },
            new String [] {
                "", "", "", "", "null", "null", "null", "null", "null"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaPendientes.getTableHeader().setReorderingAllowed(false);
        jScrollPane5.setViewportView(tablaPendientes);

        getContentPane().add(jScrollPane5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 230, 970, 100));

        labelFechaPautada.setText("Fecha Pautada:");
        getContentPane().add(labelFechaPautada, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 550, 100, 20));

        txtFechaPautada.setEditable(false);
        getContentPane().add(txtFechaPautada, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 550, 101, -1));

        btnConservar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar.png"))); // NOI18N
        btnConservar.setText("Guardar Fecha");
        btnConservar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConservarActionPerformed(evt);
            }
        });
        getContentPane().add(btnConservar, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 630, -1, -1));

        btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/cancelar.png"))); // NOI18N
        btnCancelar.setText("Cancelar");
        btnCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarActionPerformed(evt);
            }
        });
        getContentPane().add(btnCancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(885, 640, 100, -1));

        btnListo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ordenlista.png"))); // NOI18N
        btnListo.setText("Orden Lista");
        btnListo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListoActionPerformed(evt);
            }
        });
        getContentPane().add(btnListo, new org.netbeans.lib.awtextra.AbsoluteConstraints(720, 640, 150, -1));

        btnEntregada.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/ordenentregada.png"))); // NOI18N
        btnEntregada.setText("Orden Entregada");
        btnEntregada.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEntregadaActionPerformed(evt);
            }
        });
        getContentPane().add(btnEntregada, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 640, 160, -1));

        txtLugarAlmacenaje.setEditable(false);
        txtLugarAlmacenaje.setColumns(20);
        txtLugarAlmacenaje.setFont(new java.awt.Font("Times New Roman", 2, 14)); // NOI18N
        txtLugarAlmacenaje.setRows(5);
        txtLugarAlmacenaje.setOpaque(false);
        jScrollPane2.setViewportView(txtLugarAlmacenaje);

        getContentPane().add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 380, -1, -1));

        labelLugar.setText("Lugar de almacenamiento de la orden:");
        getContentPane().add(labelLugar, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 350, 220, -1));

        areaObservaciones.setEditable(false);
        areaObservaciones.setColumns(20);
        areaObservaciones.setRows(5);
        jScrollPane4.setViewportView(areaObservaciones);

        getContentPane().add(jScrollPane4, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 380, -1, -1));

        jLabel1.setText("Observaciones:");
        getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 350, 90, -1));

        labelHoraDesde.setText("Desde:");
        labelHoraDesde.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        getContentPane().add(labelHoraDesde, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 606, -1, -1));

        labelHoraHasta.setText("Hasta:");
        labelHoraHasta.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        getContentPane().add(labelHoraHasta, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 636, -1, -1));

        txtHoraDesde.setEditable(false);
        txtHoraDesde.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtHoraDesdeActionPerformed(evt);
            }
        });
        getContentPane().add(txtHoraDesde, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 600, -1, -1));

        txtHoraHasta.setEditable(false);
        getContentPane().add(txtHoraHasta, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 630, -1, -1));

        labelFechaListo.setText("Fecha Listo");
        getContentPane().add(labelFechaListo, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 550, -1, 20));

        labelHoraListo.setText("Hora Listo");
        getContentPane().add(labelHoraListo, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 590, -1, 20));

        txtFechaListo.setEditable(false);
        txtFechaListo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtFechaListoActionPerformed(evt);
            }
        });
        getContentPane().add(txtFechaListo, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 550, 101, -1));

        txtHoraListo.setEditable(false);
        txtHoraListo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtHoraListoActionPerformed(evt);
            }
        });
        getContentPane().add(txtHoraListo, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 590, 101, -1));

        labelFechaEntrega.setText("Fecha Entrega");
        getContentPane().add(labelFechaEntrega, new org.netbeans.lib.awtextra.AbsoluteConstraints(780, 550, -1, 20));

        labelHoraEntrega.setText("Hora Entrega");
        getContentPane().add(labelHoraEntrega, new org.netbeans.lib.awtextra.AbsoluteConstraints(780, 590, -1, 20));

        txtFechaEntrega.setEditable(false);
        txtFechaEntrega.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtFechaEntregaActionPerformed(evt);
            }
        });
        getContentPane().add(txtFechaEntrega, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 550, 101, -1));

        txtHoraEntrega.setEditable(false);
        txtHoraEntrega.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtHoraEntregaActionPerformed(evt);
            }
        });
        getContentPane().add(txtHoraEntrega, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 590, 101, -1));

        labelDelivery.setText("Retira por Local:");
        getContentPane().add(labelDelivery, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 574, 110, 20));
    }// </editor-fold>//GEN-END:initComponents

    private void idOActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_idOActionPerformed

    }//GEN-LAST:event_idOActionPerformed

    private void txtFechaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtFechaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtFechaActionPerformed

    private void txtHoraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHoraActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtHoraActionPerformed

    private void tablaMontosInputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_tablaMontosInputMethodTextChanged

    }//GEN-LAST:event_tablaMontosInputMethodTextChanged

    private void tablaMontosKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tablaMontosKeyPressed

    }//GEN-LAST:event_tablaMontosKeyPressed

    private void txtIDclienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtIDclienteActionPerformed

    }//GEN-LAST:event_txtIDclienteActionPerformed

    private void txtApellidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtApellidoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtApellidoActionPerformed

    private void txtTelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTelActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtTelActionPerformed

    private void txtCelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCelActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtCelActionPerformed

    private void txtDireccionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtDireccionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtDireccionActionPerformed

    private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
        int opcion=JOptionPane.showConfirmDialog(null, "¿Desea cerrar? Si lo hace se perdera cualquier cambio que haya efectuado.","Advertencia",JOptionPane.WARNING_MESSAGE);
        if(opcion==JOptionPane.OK_OPTION)
            this.dispose();
    }//GEN-LAST:event_btnCancelarActionPerformed

    private void btnListoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListoActionPerformed
        String almacenaje=JOptionPane.showInputDialog(null,"Ingrese una descripción del lugar donde se almacenará el pedido","",JOptionPane.PLAIN_MESSAGE);
        String fechaActual;
        String horaActual;
        fechaActual=formateador.format(calendario.getTime());
        horaActual=formateadorHora.format(calendario.getTime());
        
        try {
            if(almacenaje!=null && !almacenaje.isEmpty()){
                this.administradorOrden.modificarEstado("LISTA", orden.getCodOrden());
                this.administradorOrden.setLugarAlmacenaje(almacenaje,orden.getCodOrden());
                this.administradorOrden.setFechaListo(fechaActual, orden.getCodOrden());
                this.administradorOrden.setHoraListo(horaActual,orden.getCodOrden());
            }
            else{
                return;
            }
            
        } catch (SQLException ex) {    
        }
        this.dispose();
    }//GEN-LAST:event_btnListoActionPerformed

    private void btnConservarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConservarActionPerformed
        Date fecha=null;
        try{
        fecha = this.jDateChooser1.getDate();    
        }catch(Exception e){
            if(fecha==null)
                return;
        }
        if(!(orden.getSituacionOrden().equalsIgnoreCase("ENTREGADA"))){
            String fechaNueva;
            String horaNuevaDesde;
            String horaNuevaHasta;
            try {
                calendario.setTime(fecha);
                fechaNueva= formateador.format(calendario.getTime());
                this.administradorOrden.setFechaEntregaPautada(fechaNueva, orden.getCodOrden());
                Integer opcion=JOptionPane.showConfirmDialog(null, "¿Desea modificar el horario de entrega?", "Horario de Entrega", JOptionPane.YES_NO_OPTION);
                String horaDesde;
                String horaHasta = null;
                if(opcion==JOptionPane.YES_OPTION){
                    Integer min=new Integer(8);
                    Integer max=new Integer(21);
                   
                    JSpinner spinnerDesde=new JSpinner();
                    JSpinner spinnerHasta=new JSpinner();
                    spinnerDesde.setModel(new javax.swing.SpinnerNumberModel(min, min, max, Integer.valueOf(1)));
                    spinnerHasta.setModel(new javax.swing.SpinnerNumberModel(min, min, max, Integer.valueOf(1)));
                    
                    Object[] options = {"Retira","Delivery"};
                    opcion=JOptionPane.showOptionDialog(null, "Seleccione la opción que corresponda","Seleccione modo de entrega", JOptionPane.YES_NO_OPTION, 
                    JOptionPane.QUESTION_MESSAGE, 
                    null, options, options[1]);
                    
                    
                    JOptionPane.showOptionDialog(null, spinnerDesde,"Ingrese el horario desde ",JOptionPane.OK_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null);
                    horaDesde=spinnerDesde.getValue()+":00";
                    boolean delivery=false;
                    if(opcion==JOptionPane.NO_OPTION){
                        delivery=true;
                        JOptionPane.showOptionDialog(null, spinnerHasta, "Ingrese el horario hasta ", JOptionPane.OK_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null);
                        if((Integer)spinnerHasta.getValue()<=(Integer)spinnerDesde.getValue()){
                            JOptionPane.showMessageDialog(null, "El horario elegido no tiene sentido. No se puede guardar estos datos");
                            return;
                        }
                        horaHasta=spinnerHasta.getValue()+":00";
                    }else if(opcion==JOptionPane.CLOSED_OPTION){
                        /*if(orden.tieneDelivery()){
                            delivery=true;
                            JOptionPane.showOptionDialog(null, spinnerHasta, "Ingrese el horario hasta ", JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null);
                            
                            horaHasta=spinnerHasta.getValue()+":00";
                        }*/
                        
                        JOptionPane.showMessageDialog(null, "No guardo los datos. Si desea cambiar la fecha y el horario de entrega, vuelva a intentarlo.");
                    }
                    this.administradorOrden.setDelivery(orden.getCodOrden(),delivery);
                    this.administradorOrden.setNuevaHoraPautadaD(orden.getCodOrden(),horaDesde);
                    if(delivery){
                        this.administradorOrden.setNuevaHoraPautadaH(orden.getCodOrden(),horaHasta);
                    }
                    
                }
                //this.administradorOrden.setHoraListo(horaNuevaHasta, ERROR);
            } catch (SQLException ex) {
                JOptionPane.showMessageDialog(null,"Hubo un fallo al guardar la nueva fecha");
            }
        }
        this.dispose();
    }//GEN-LAST:event_btnConservarActionPerformed

    private void btnEntregadaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEntregadaActionPerformed
        String fechaActual;
        String horaActual;
        fechaActual=formateador.format(calendario.getTime());
        horaActual=formateadorHora.format(calendario.getTime());
        
        try {
            this.administradorOrden.setFechaEntrega(fechaHoy,orden.getCodOrden());
            this.administradorOrden.setHoraEntrega(horaActual,orden.getCodOrden());
            this.administradorOrden.modificarEstado("ENTREGADA",orden.getCodOrden());

        } catch (SQLException ex) {    }
        
        this.dispose();
        
    }//GEN-LAST:event_btnEntregadaActionPerformed

    private void txtHoraListoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHoraListoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtHoraListoActionPerformed

    private void txtFechaListoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtFechaListoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtFechaListoActionPerformed

    private void txtHoraEntregaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHoraEntregaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtHoraEntregaActionPerformed

    private void txtFechaEntregaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtFechaEntregaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtFechaEntregaActionPerformed

    private void txtHoraDesdeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHoraDesdeActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtHoraDesdeActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea areaObservaciones;
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnConservar;
    private javax.swing.JButton btnEntregada;
    private javax.swing.JButton btnListo;
    private javax.swing.JTextField idO;
    private com.toedter.calendar.JDateChooser jDateChooser1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JLabel labelApellido;
    private javax.swing.JLabel labelCel;
    private javax.swing.JLabel labelCliente;
    private javax.swing.JLabel labelDelivery;
    private javax.swing.JLabel labelDireccion;
    private javax.swing.JLabel labelFechaEntrega;
    private javax.swing.JLabel labelFechaListo;
    private javax.swing.JLabel labelFechaPautada;
    private javax.swing.JLabel labelHoraDesde;
    private javax.swing.JLabel labelHoraEntrega;
    private javax.swing.JLabel labelHoraHasta;
    private javax.swing.JLabel labelHoraListo;
    private javax.swing.JLabel labelLugar;
    private javax.swing.JLabel labelNombre;
    private javax.swing.JLabel labelNuevaFecha;
    private javax.swing.JLabel labelTel;
    private javax.swing.JTable tablaMontos;
    private javax.swing.JTable tablaPendientes;
    private javax.swing.JTable tablaServicio;
    private javax.swing.JTextField txtApellido;
    private javax.swing.JTextField txtCel;
    private javax.swing.JTextField txtDireccion;
    private javax.swing.JTextField txtEstado;
    private javax.swing.JTextField txtFecha;
    private javax.swing.JTextField txtFechaEntrega;
    private javax.swing.JTextField txtFechaListo;
    private javax.swing.JTextField txtFechaPautada;
    private javax.swing.JTextField txtHora;
    private javax.swing.JTextField txtHoraDesde;
    private javax.swing.JTextField txtHoraEntrega;
    private javax.swing.JTextField txtHoraHasta;
    private javax.swing.JTextField txtHoraListo;
    private javax.swing.JTextField txtIDcliente;
    private javax.swing.JTextArea txtLugarAlmacenaje;
    private javax.swing.JTextField txtNombre;
    private javax.swing.JTextField txtTel;
    // End of variables declaration//GEN-END:variables
    
}

